package com.ttg.common.enums;


/**
 * @author zhangHongYuan
 * @description
 * @date 2023/7/12 14:42
 */
public enum VipTypeEnum {


    ORDINARY_VIP("1", "普通用户"),
    MCT_VIP("2", "商户用户");


    private String code;

    private String value;

     VipTypeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static VipTypeEnum getByCode(String code){
        for (VipTypeEnum value : values()) {
            if (value.getCode().equals(code)){
                return value;
            }
        }
        return  null;
    }
}
